﻿using MySchool;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace MyKTV
{
    public partial class qianduan : Form
    {
        public string tupian;
        DBHelper db = new DBHelper();
        DataSet set = new DataSet();
        string tup;
        string s;
        public qianduan()
        {
            InitializeComponent();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void qianduan_Load(object sender, EventArgs e)
        {
            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id";
            SqlDataAdapter adapter2 = new SqlDataAdapter(sql2, db.Connection);
            adapter2.Fill(set, "singer_info");
            this.dataGridView1.DataSource = set.Tables["singer_info"];
            db.CloseConnection();


            this.dataGridView1.Hide();
            this.axWindowsMediaPlayer2.Hide();


            this.pictureBox25.BackColor = Color.FromArgb(65, 204, 212, 230);
            this.pictureBox26.BackColor = Color.FromArgb(65, 204, 212, 230);
            
            this.panel1.BackColor = Color.FromArgb(65, 204, 212, 230);
            
            this.panel2.BackColor = Color.FromArgb(65, 204, 212, 230);
            this.label1.BackColor = Color.FromArgb(65, 204, 212, 230);
            this.label2.BackColor = Color.FromArgb(65, 204, 212, 230);
            this.panel4.BackColor = Color.FromArgb(65, 204, 212, 230);
            this.axWindowsMediaPlayer1.close();
            this.pictureBox26.Hide();
            this.pictureBox25.Show();
            this.label1.ForeColor = Color.Black;
            this.panel4.Hide();
            axWindowsMediaPlayer1.Ctlcontrols.play();
            this.axWindowsMediaPlayer1.close();

            this.pictureBox28.Hide();

            AxWMPLib.AxWindowsMediaPlayer myPlayer = new AxWMPLib.AxWindowsMediaPlayer();
            int zongshu = dataGridView1.Rows.Count;
            string[] tupian = new string[100];
            string s;
            for (int i = 0; i <zongshu; i++)
            {
                s = dataGridView1.Rows[0].Cells["singer_photo_url"].Value.ToString();
                tupian[i] = s;
                this.Tag = tupian[i];
                this.label13.Text = Tag.ToString();
               
            }

            







           s = dataGridView1.Rows[0].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = s;
            this.pictureBox1.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s );

            string d = dataGridView1.Rows[1].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag =d;
            this.pictureBox2.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + d);

            string f = dataGridView1.Rows[2].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = f;
            this.pictureBox3.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + f);

            string g = dataGridView1.Rows[3].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox4.Tag = g;
            this.pictureBox4.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + g);

            string h = dataGridView1.Rows[4].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox5.Tag = h;
            this.pictureBox5.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + h);

            string j = dataGridView1.Rows[5].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox6.Tag =j;
            this.pictureBox6.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + j);

            string k = dataGridView1.Rows[6].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox7.Tag = k;
            this.pictureBox7.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + k);

            string l = dataGridView1.Rows[7].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox8.Tag = l;
            this.pictureBox8.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + l);

            string a = dataGridView1.Rows[8].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox9.Tag = a;
            this.pictureBox9.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + a);

            string b = dataGridView1.Rows[9].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox10.Tag = b;
            this.pictureBox10.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + b);

        }

        private void pictureBox25_Click(object sender, EventArgs e)
        {
            this.panel1.Show();
            this.panel2.Hide();

            this.pictureBox25.Hide();
            this.pictureBox26.Show();
        }

        private void pictureBox26_Click(object sender, EventArgs e)
        {
            this.panel1.Hide();
            this.panel2.Show();
            this.pictureBox25.Show();
            this.pictureBox26.Hide();
        }

        private void pictureBox27_Click(object sender, EventArgs e)
        {

        }

        private void pictureBox28_Click(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {
            this.pictureBox25.Show();
            this.panel4.Hide();
            this.panel3.Hide();
            this.panel2.Show();
            this.panel1.Hide();

            this.label1.ForeColor = Color.Black;
            this.label2.ForeColor = Color.Transparent;

            this.axWindowsMediaPlayer1.close();
        }

        private void pictureBox29_Click(object sender, EventArgs e)
        {

        }

        private void button1_Click_1(object sender, EventArgs e)
        {
          

            

        }

        private void menuStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        private void axWindowsMediaPlayer1_Enter(object sender, EventArgs e)
        {
            // OpenFileDialog openFileDialog1 = new OpenFileDialog();
            //openFileDialog1.Filter = "媒体文件（所有类型）|*.mp4;*.mp3;*.mpeg;*.wma;*.wmv;*.wav;*.avi";
            // if (openFileDialog1.ShowDialog() == DialogResult.OK)
            //{
            // axWindowsMediaPlayer1.URL = openFileDialog1.FileName;
            // }
            // OpenFileDialog o = new OpenFileDialog();

            // if (o.ShowDialog() == DialogResult.OK)
            //{
            //   axWindowsMediaPlayer1.URL = o.FileName;

            // }


           
        }

        private void label2_Click(object sender, EventArgs e)
        {
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Show();
            this.pictureBox25.Hide();
            this.pictureBox26.Hide();
            this.axWindowsMediaPlayer1.Show();

            this.label1.ForeColor = Color.Transparent;
            this.label2.ForeColor = Color.Black;

            axWindowsMediaPlayer1.Ctlcontrols.play();
        }

        private void label2_MouseLeave(object sender, EventArgs e)
        {
            this.label2.BackColor = Color.FromArgb(65, 204, 212, 230);
        }

        private void label2_MouseEnter(object sender, EventArgs e)
        {
            this.label2.BackColor =Color.Black;
        }

        private void ucKeyBorderAll1_KeyDown(object sender, KeyEventArgs e)
        {

        }

        private void label1_MouseEnter(object sender, EventArgs e)
        {
            this.label1.BackColor = Color.Black;
        }

        private void label1_MouseLeave(object sender, EventArgs e)
        {
            this.label1.BackColor = Color.FromArgb(65, 204, 212, 230);
        }

        private void pictureBox23_MouseEnter(object sender, EventArgs e)
        {
           
            
        }

        private void pictureBox23_Click(object sender, EventArgs e)
        {
            string s = dataGridView1.Rows[1].Cells["singer_photo_url"].Value.ToString();

            this.pictureBox26.Hide();
            this.pictureBox25.Hide();
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Hide();
            this.panel4.Show();

            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id where singer_name=N'" + s + "'";
            SqlCommand comm = new SqlCommand(sql2, db.Connection);
            SqlDataReader reader = comm.ExecuteReader();
            while (reader.Read())
            {
                this.label5.Text = reader["singer_name"].ToString();
                this.label3.Text = reader["singertype_name"].ToString();
                this.label4.Text = reader["singer_gender"].ToString();
                this.label6.Text = reader["singer_description"].ToString();
            }
            this.pictureBox27.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s);
            reader.Close();
            db.CloseConnection();

        }

        private void panel3_MouseEnter(object sender, EventArgs e)
        {
            
        }

        private void panel3_MouseLeave(object sender, EventArgs e)
        {
            
        }

        private void panel3_Paint(object sender, PaintEventArgs e)
        {

        }

        private void label1_MouseDown(object sender, MouseEventArgs e)
        {
           
        }

        private void pictureBox23_MouseLeave(object sender, EventArgs e)
        {
           
        }

        private void panel4_Paint(object sender, PaintEventArgs e)
        {
            
            this.pictureBox28.Show();
        }

        private void pictureBox12_Click(object sender, EventArgs e)
        {

            
        }

        private void pictureBox12_MouseClick(object sender, MouseEventArgs e)
        {
            
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.panel4.Hide();
            this.panel1.Show();
            this.panel2.Show();
            this.panel3.Show();
        }

        private void panel2_Paint(object sender, PaintEventArgs e)
        {

        }

        private void pictureBox28_Click_1(object sender, EventArgs e)
        {
            this.panel4.Hide();
            this.panel1.Show();
            this.panel2.Show();
            this.panel3.Show();
           
        }

        private void pictureBox1_Click(object sender, EventArgs e)
        {
            
        }

        private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {

        }

        private void pictureBox1_Click_1(object sender, EventArgs e)
        {

            string s = dataGridView1.Rows[0].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = s;
            this.pictureBox26.Hide();
            this.pictureBox25.Hide();
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Hide();
            this.panel4.Show();

            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id where singer_photo_url=N'" + s + "'";
            SqlCommand comm = new SqlCommand(sql2, db.Connection);
            SqlDataReader reader = comm.ExecuteReader();
            while (reader.Read())
            {
                this.label5.Text = reader["singer_name"].ToString();
                this.label3.Text = reader["singertype_name"].ToString();
                this.label4.Text = reader["singer_gender"].ToString();
                this.label6.Text = reader["singer_description"].ToString();
            }
            this.pictureBox27.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s);
            reader.Close();

            db.CloseConnection();
            db.OpenConnection();
            string sql = "select [song_name] from song_info inner join singer_info on  song_info.singer_id = singer_info.singer_id inner join singer_type on singer_type.singertype_id = song_info.songtype_id where singer_name = N'" + this.label5.Text + "'";
            SqlCommand command = new SqlCommand(sql, db.Connection);
            SqlDataReader reader1 = command.ExecuteReader();
            string[] chun = new string[6];

            for (int i = 0; i < chun.Length; )
            {
                while (reader1.Read())
                {
                    chun[i] = reader1["song_name"].ToString();
                    i++;
                }

                break;

            }
            reader1.Close();
            db.CloseConnection();
            this.label7.Text = chun[0];
            this.label8.Text = chun[1];
            this.label9.Text = chun[2];
            this.label10.Text = chun[3];
            this.label11.Text = chun[4];
            this.label12.Text = chun[5];
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            
            string s = dataGridView1.Rows[1].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = s;
            this.pictureBox26.Hide();
            this.pictureBox25.Hide();
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Hide();
            this.panel4.Show();

            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id where singer_photo_url=N'" + s + "'";
            SqlCommand comm = new SqlCommand(sql2, db.Connection);
            SqlDataReader reader = comm.ExecuteReader();
            while (reader.Read())
            {
                this.label5.Text = reader["singer_name"].ToString();
                this.label3.Text = reader["singertype_name"].ToString();
                this.label4.Text = reader["singer_gender"].ToString();
                this.label6.Text = reader["singer_description"].ToString();
            }
            this.pictureBox27.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s);
            reader.Close();

            db.CloseConnection();
            db.OpenConnection();
            string sql = "select [song_name] from song_info inner join singer_info on  song_info.singer_id = singer_info.singer_id inner join singer_type on singer_type.singertype_id = song_info.songtype_id where singer_name = N'" + this.label5.Text + "'";
            SqlCommand command = new SqlCommand(sql,db.Connection);
            SqlDataReader reader1 = command.ExecuteReader();
            string[] chun = new string[6];
            
            for (int i = 0; i < chun.Length;)
            {
                while (reader1.Read())
                {
                    chun[i] = reader1["song_name"].ToString();
                    i++;
                }

                break;
                
            }
            reader1.Close();
            db.CloseConnection();
            this.label7.Text = chun[0];
            this.label8.Text = chun[1];
            this.label9.Text = chun[2];
            this.label10.Text = chun[3];
            this.label11.Text = chun[4];
            this.label12.Text = chun[5];
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {
            string s = dataGridView1.Rows[2].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = s;
            this.pictureBox26.Hide();
            this.pictureBox25.Hide();
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Hide();
            this.panel4.Show();

            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id where singer_photo_url=N'" + s + "'";
            SqlCommand comm = new SqlCommand(sql2, db.Connection);
            SqlDataReader reader = comm.ExecuteReader();
            while (reader.Read())
            {
                this.label5.Text = reader["singer_name"].ToString();
                this.label3.Text = reader["singertype_name"].ToString();
                this.label4.Text = reader["singer_gender"].ToString();
                this.label6.Text = reader["singer_description"].ToString();
            }
            this.pictureBox27.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s);
            reader.Close();

            db.CloseConnection();
            db.OpenConnection();
            string sql = "select [song_name] from song_info inner join singer_info on  song_info.singer_id = singer_info.singer_id inner join singer_type on singer_type.singertype_id = song_info.songtype_id where singer_name = N'" + this.label5.Text + "'";
            SqlCommand command = new SqlCommand(sql, db.Connection);
            SqlDataReader reader1 = command.ExecuteReader();
            string[] chun = new string[6];

            for (int i = 0; i < chun.Length;)
            {
                while (reader1.Read())
                {
                    chun[i] = reader1["song_name"].ToString();
                    i++;
                }

                break;

            }
            reader1.Close();
            db.CloseConnection();
            this.label7.Text = chun[0];
            this.label8.Text = chun[1];
            this.label9.Text = chun[2];
            this.label10.Text = chun[3];
            this.label11.Text = chun[4];
            this.label12.Text = chun[5];
        }

        private void pictureBox4_Click(object sender, EventArgs e)
        {
            string s = dataGridView1.Rows[3].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = s;
            this.pictureBox26.Hide();
            this.pictureBox25.Hide();
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Hide();
            this.panel4.Show();

            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id where singer_photo_url=N'" + s + "'";
            SqlCommand comm = new SqlCommand(sql2, db.Connection);
            SqlDataReader reader = comm.ExecuteReader();
            while (reader.Read())
            {
                this.label5.Text = reader["singer_name"].ToString();
                this.label3.Text = reader["singertype_name"].ToString();
                this.label4.Text = reader["singer_gender"].ToString();
                this.label6.Text = reader["singer_description"].ToString();
            }
            this.pictureBox27.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s);
            reader.Close();

            db.CloseConnection();
            db.OpenConnection();
            string sql = "select [song_name] from song_info inner join singer_info on  song_info.singer_id = singer_info.singer_id inner join singer_type on singer_type.singertype_id = song_info.songtype_id where singer_name = N'" + this.label5.Text + "'";
            SqlCommand command = new SqlCommand(sql, db.Connection);
            SqlDataReader reader1 = command.ExecuteReader();
            string[] chun = new string[6];

            for (int i = 0; i < chun.Length;)
            {
                while (reader1.Read())
                {
                    chun[i] = reader1["song_name"].ToString();
                    i++;
                }

                break;

            }
            reader1.Close();
            db.CloseConnection();
            this.label7.Text = chun[0];
            this.label8.Text = chun[1];
            this.label9.Text = chun[2];
            this.label10.Text = chun[3];
            this.label11.Text = chun[4];
            this.label12.Text = chun[5];
        }

        private void pictureBox5_Click(object sender, EventArgs e)
        {
            string s = dataGridView1.Rows[4].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = s;
            this.pictureBox26.Hide();
            this.pictureBox25.Hide();
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Hide();
            this.panel4.Show();

            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id where singer_photo_url=N'" + s + "'";
            SqlCommand comm = new SqlCommand(sql2, db.Connection);
            SqlDataReader reader = comm.ExecuteReader();
            while (reader.Read())
            {
                this.label5.Text = reader["singer_name"].ToString();
                this.label3.Text = reader["singertype_name"].ToString();
                this.label4.Text = reader["singer_gender"].ToString();
                this.label6.Text = reader["singer_description"].ToString();
            }
            this.pictureBox27.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s);
            reader.Close();

            db.CloseConnection();
            db.OpenConnection();
            string sql = "select [song_name] from song_info inner join singer_info on  song_info.singer_id = singer_info.singer_id inner join singer_type on singer_type.singertype_id = song_info.songtype_id where singer_name = N'" + this.label5.Text + "'";
            SqlCommand command = new SqlCommand(sql, db.Connection);
            SqlDataReader reader1 = command.ExecuteReader();
            string[] chun = new string[6];

            for (int i = 0; i < chun.Length;)
            {
                while (reader1.Read())
                {
                    chun[i] = reader1["song_name"].ToString();
                    i++;
                }

                break;

            }
            reader1.Close();
            db.CloseConnection();
            this.label7.Text = chun[0];
            this.label8.Text = chun[1];
            this.label9.Text = chun[2];
            this.label10.Text = chun[3];
            this.label11.Text = chun[4];
            this.label12.Text = chun[5];
        }

        private void pictureBox6_Click(object sender, EventArgs e)
        {
            string s = dataGridView1.Rows[5].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = s;
            this.pictureBox26.Hide();
            this.pictureBox25.Hide();
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Hide();
            this.panel4.Show();

            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id where singer_photo_url=N'" + s + "'";
            SqlCommand comm = new SqlCommand(sql2, db.Connection);
            SqlDataReader reader = comm.ExecuteReader();
            while (reader.Read())
            {
                this.label5.Text = reader["singer_name"].ToString();
                this.label3.Text = reader["singertype_name"].ToString();
                this.label4.Text = reader["singer_gender"].ToString();
                this.label6.Text = reader["singer_description"].ToString();
            }
            this.pictureBox27.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s);
            reader.Close();

            db.CloseConnection();
            db.OpenConnection();
            string sql = "select [song_name] from song_info inner join singer_info on  song_info.singer_id = singer_info.singer_id inner join singer_type on singer_type.singertype_id = song_info.songtype_id where singer_name = N'" + this.label5.Text + "'";
            SqlCommand command = new SqlCommand(sql, db.Connection);
            SqlDataReader reader1 = command.ExecuteReader();
            string[] chun = new string[6];

            for (int i = 0; i < chun.Length;)
            {
                while (reader1.Read())
                {
                    chun[i] = reader1["song_name"].ToString();
                    i++;
                }

                break;

            }
            reader1.Close();
            db.CloseConnection();
            this.label7.Text = chun[0];
            this.label8.Text = chun[1];
            this.label9.Text = chun[2];
            this.label10.Text = chun[3];
            this.label11.Text = chun[4];
            this.label12.Text = chun[5];
        }

        private void pictureBox7_Click(object sender, EventArgs e)
        {
            string s = dataGridView1.Rows[6].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = s;
            this.pictureBox26.Hide();
            this.pictureBox25.Hide();
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Hide();
            this.panel4.Show();

            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id where singer_photo_url=N'" + s + "'";
            SqlCommand comm = new SqlCommand(sql2, db.Connection);
            SqlDataReader reader = comm.ExecuteReader();
            while (reader.Read())
            {
                this.label5.Text = reader["singer_name"].ToString();
                this.label3.Text = reader["singertype_name"].ToString();
                this.label4.Text = reader["singer_gender"].ToString();
                this.label6.Text = reader["singer_description"].ToString();
            }
            this.pictureBox27.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s);
            reader.Close();

            db.CloseConnection();
            db.OpenConnection();
            string sql = "select [song_name] from song_info inner join singer_info on  song_info.singer_id = singer_info.singer_id inner join singer_type on singer_type.singertype_id = song_info.songtype_id where singer_name = N'" + this.label5.Text + "'";
            SqlCommand command = new SqlCommand(sql, db.Connection);
            SqlDataReader reader1 = command.ExecuteReader();
            string[] chun = new string[6];

            for (int i = 0; i < chun.Length;)
            {
                while (reader1.Read())
                {
                    chun[i] = reader1["song_name"].ToString();
                    i++;
                }

                break;

            }
            reader1.Close();
            db.CloseConnection();
            this.label7.Text = chun[0];
            this.label8.Text = chun[1];
            this.label9.Text = chun[2];
            this.label10.Text = chun[3];
            this.label11.Text = chun[4];
            this.label12.Text = chun[5];
        }

        private void dataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            
        }

        private void label7_Click(object sender, EventArgs e)
        {

        }

        private void label8_Click(object sender, EventArgs e)
        {

        }

        private void label13_Click(object sender, EventArgs e)
        {

        }

        private void pictureBox8_Click(object sender, EventArgs e)
        {
            string s = dataGridView1.Rows[7].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = s;
            this.pictureBox26.Hide();
            this.pictureBox25.Hide();
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Hide();
            this.panel4.Show();

            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id where singer_photo_url=N'" + s + "'";
            SqlCommand comm = new SqlCommand(sql2, db.Connection);
            SqlDataReader reader = comm.ExecuteReader();
            while (reader.Read())
            {
                this.label5.Text = reader["singer_name"].ToString();
                this.label3.Text = reader["singertype_name"].ToString();
                this.label4.Text = reader["singer_gender"].ToString();
                this.label6.Text = reader["singer_description"].ToString();
            }
            this.pictureBox27.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s);
            reader.Close();

            db.CloseConnection();
            db.OpenConnection();
            string sql = "select [song_name] from song_info inner join singer_info on  song_info.singer_id = singer_info.singer_id inner join singer_type on singer_type.singertype_id = song_info.songtype_id where singer_name = N'" + this.label5.Text + "'";
            SqlCommand command = new SqlCommand(sql, db.Connection);
            SqlDataReader reader1 = command.ExecuteReader();
            string[] chun = new string[6];

            for (int i = 0; i < chun.Length; )
            {
                while (reader1.Read())
                {
                    chun[i] = reader1["song_name"].ToString();
                    i++;
                }

                break;

            }
            reader1.Close();
            db.CloseConnection();
            this.label7.Text = chun[0];
            this.label8.Text = chun[1];
            this.label9.Text = chun[2];
            this.label10.Text = chun[3];
            this.label11.Text = chun[4];
            this.label12.Text = chun[5];
        }

        private void label7_Click_1(object sender, EventArgs e)
        {
            axWindowsMediaPlayer2.URL = "C:\\Users\\cyj\\Desktop\\KTV素材\\"+this.label7.Text+".mp3";
        }

        private void pictureBox9_Click(object sender, EventArgs e)
        {
            string s = dataGridView1.Rows[8].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = s;
            this.pictureBox26.Hide();
            this.pictureBox25.Hide();
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Hide();
            this.panel4.Show();

            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id where singer_photo_url=N'" + s + "'";
            SqlCommand comm = new SqlCommand(sql2, db.Connection);
            SqlDataReader reader = comm.ExecuteReader();
            while (reader.Read())
            {
                this.label5.Text = reader["singer_name"].ToString();
                this.label3.Text = reader["singertype_name"].ToString();
                this.label4.Text = reader["singer_gender"].ToString();
                this.label6.Text = reader["singer_description"].ToString();
            }
            this.pictureBox27.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s);
            reader.Close();

            db.CloseConnection();
            db.OpenConnection();
            string sql = "select [song_name] from song_info inner join singer_info on  song_info.singer_id = singer_info.singer_id inner join singer_type on singer_type.singertype_id = song_info.songtype_id where singer_name = N'" + this.label5.Text + "'";
            SqlCommand command = new SqlCommand(sql, db.Connection);
            SqlDataReader reader1 = command.ExecuteReader();
            string[] chun = new string[6];

            for (int i = 0; i < chun.Length;)
            {
                while (reader1.Read())
                {
                    chun[i] = reader1["song_name"].ToString();
                    i++;
                }

                break;

            }
            reader1.Close();
            db.CloseConnection();
            this.label7.Text = chun[0];
            this.label8.Text = chun[1];
            this.label9.Text = chun[2];
            this.label10.Text = chun[3];
            this.label11.Text = chun[4];
            this.label12.Text = chun[5];
        }

        private void label8_Click_1(object sender, EventArgs e)
        {
            axWindowsMediaPlayer2.URL = "C:\\Users\\cyj\\Desktop\\KTV素材\\" + this.label8.Text + ".mp3";
        }

        private void label9_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer2.URL = "C:\\Users\\cyj\\Desktop\\KTV素材\\" + this.label9.Text + ".mp3";
        }

        private void label10_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer2.URL = "C:\\Users\\cyj\\Desktop\\KTV素材\\" + this.label10.Text + ".mp3";
        }

        private void label11_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer2.URL = "C:\\Users\\cyj\\Desktop\\KTV素材\\" + this.label11.Text + ".mp3";
        }

        private void label12_Click(object sender, EventArgs e)
        {
            axWindowsMediaPlayer2.URL = "C:\\Users\\cyj\\Desktop\\KTV素材\\" + this.label2.Text + ".mp3";
        }

        private void pictureBox10_Click(object sender, EventArgs e)
        {
            string s = dataGridView1.Rows[9].Cells["singer_photo_url"].Value.ToString();
            this.pictureBox1.Tag = s;
            this.pictureBox26.Hide();
            this.pictureBox25.Hide();
            this.panel1.Hide();
            this.panel2.Hide();
            this.panel3.Hide();
            this.panel4.Show();

            db.OpenConnection();
            string sql2 = "select singer_name,singer_type.singertype_name,singer_gender,singer_photo_url,singer_description from  singer_info inner join singer_type on singer_info.singertype_id=singer_type.singertype_id where singer_photo_url=N'" + s + "'";
            SqlCommand comm = new SqlCommand(sql2, db.Connection);
            SqlDataReader reader = comm.ExecuteReader();
            while (reader.Read())
            {
                this.label5.Text = reader["singer_name"].ToString();
                this.label3.Text = reader["singertype_name"].ToString();
                this.label4.Text = reader["singer_gender"].ToString();
                this.label6.Text = reader["singer_description"].ToString();
            }
            this.pictureBox27.Image = Image.FromFile("C:\\Users\\cyj\\Desktop\\QQ头像\\" + s);
            reader.Close();

            db.CloseConnection();
            db.OpenConnection();
            string sql = "select [song_name] from song_info inner join singer_info on  song_info.singer_id = singer_info.singer_id inner join singer_type on singer_type.singertype_id = song_info.songtype_id where singer_name = N'" + this.label5.Text + "'";
            SqlCommand command = new SqlCommand(sql, db.Connection);
            SqlDataReader reader1 = command.ExecuteReader();
            string[] chun = new string[6];

            for (int i = 0; i < chun.Length;)
            {
                while (reader1.Read())
                {
                    chun[i] = reader1["song_name"].ToString();
                    i++;
                }

                break;

            }
            reader1.Close();
            db.CloseConnection();
            this.label7.Text = chun[0];
            this.label8.Text = chun[1];
            this.label9.Text = chun[2];
            this.label10.Text = chun[3];
            this.label11.Text = chun[4];
            this.label12.Text = chun[5];
        }
    }
}
